-- MIAgent
-- Created by chengb Mar/11/2016
-- 小米平台代理

module("MIAgent", package.seeall);

function init()
end

-- 显示登录窗口
function showLogin()
    callJavaFunc("showChannelLogin", {}, "()V");
end

----------------------
-- 购买商品
-- @param sku 商品库存标识
function buyPurchase(sku)
    local serverId = getCurrentServerId();
    local account  = getGaming3rdAccount();
    local platform = PUBLISH_TYPE_MI;

    callJavaFunc("buyPurchase", {sku, account, serverId, platform},
        "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V");
end

